package com.cy.demo.service;

import com.cy.demo.pojo.Cart;
import com.cy.demo.pojo.CartVO;

import javax.xml.crypto.Data;
import java.util.List;


public interface ICartService {

    Integer addNum(Integer cid, Integer uid, String username,boolean add) throws Exception;

    /**
     * 将商品添加到购物车中
     * @param uid 用户id
     * @param pid 商品id
     * @param num 新增数量
     * @param username 用户名（修改者）
     */
    void addToCart(int uid,
                  int pid,
                  int num,
                  String username);
//    int updateCartNum(int cid,
//                      int num,
//                      String modifiedUser,
//                      Data modifiedTime);

    List<CartVO> getVOByUid(Integer uid);


    int deleteByCid(int cid) throws Exception;

    List<CartVO> getVOByCids(int uid, int[] cids) throws Exception;
}
